import storageApi from '../../../core/storage/storage';

function superiorAdviceController($rootScope, $scope) {
  'ngInject';

  $scope.$watch('$superiorAdviceCtrl.time', (newValue) => {
    if (newValue) {
      this.timeStr = this.handleTime(newValue);
    }
  });

  this.handleTime = (date) => {
    if (date && date !== '') {
      return (new Date(Date.parse(date.replace(/-/g, '/'))).getTime());
    }
    return null;
  };
}

export default superiorAdviceController;
